package svc

import (
	"github.com/zeromicro/go-zero/zrpc"
	"pro-train-hub/api/internal/config"
	"pro-train-hub/trainrpc/trainrpcclient"
)

type ServiceContext struct {
	Config   config.Config
	TrainRpc trainrpcclient.Trainrpc
}

func NewServiceContext(c config.Config) *ServiceContext {
	return &ServiceContext{
		Config:   c,
		TrainRpc: trainrpcclient.NewTrainrpc(zrpc.MustNewClient(c.TrainRpc)),
	}
}
